<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/statics/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<h1>工作笔记</h1>
<p><a href="toAdd">添加笔记</a></p>
<table border="1">
    <tr>
        <th>工笔标题</th>
        <th>笔记分类</th>
        <th>编写时间</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${list}" var="list">
        <tr>
            <th>${list.title}</th>
            <th><c:if test="${list.type==1}">技术</c:if>
                <c:if test="${list.type==2}">行政</c:if>
                <c:if test="${list.type==3}">人事</c:if>
            </th>
            <th>${list.createDate}</th>
            <th><a href="${pageContext.request.contextPath}/select/${list.id}">查看</a></th>
        </tr>
    </c:forEach>
</table>
<script>
    $(function () {
        $("#table th:odd").css("background","#d7eaef")
        $("#table th:even").css("background","#b4d7f1")
    })
</script>
</body>
</html>
